/* Copyright 2018 JDCLOUD.COM

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http:#www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.





Contact: 

NOTE: This class is auto generated by the jdcloud code generator program.
*/

 

#ifndef IpantiModel_h
#define IpantiModel_h

@interface OriginAddrItem :NSObject

/// 回源ip
@property (strong,nonatomic,nonnull)  NSString*  ip;

/// 权重
@property (strong,nonatomic,nonnull)  NSNumber*  weight;

/// 是否为京东云内公网ip
@property (strong,nonatomic,nonnull)  NSNumber*  inJdCloud;


-(id) initWithIp:(NSString*) ip
    weight:(NSNumber*)weight
    inJdCloud:(NSNumber*)inJdCloud;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface WebRuleProtocol :NSObject

/// http 协议
@property (strong,nonatomic,nonnull)  NSNumber*  http;

/// https 协议
@property (strong,nonatomic,nonnull)  NSNumber*  https;


-(id) initWithHttp:(NSNumber*) http
    https:(NSNumber*)https;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface ModifyBlackListRuleOfForwardRuleSpec :NSObject

/// 待引用的 IP 黑白名单 Id
@property (strong,nonatomic,nonnull)  NSString*  ipSetId;


-(id) initWithIpSetId:(NSString*) ipSetId;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface CpsIpResource :NSObject

/// 云物理服务器公网 IP 地址
@property (strong,nonatomic,nonnull)  NSString*  ip;

/// 公网 IP 类型或绑定资源类型:
   ///   0: 未知类型
   ///   1: 弹性公网 IP(IP 为弹性公网 IP, 绑定资源类型未知)
   ///   10: 弹性公网 IP(IP 为弹性公网 IP, 但未绑定资源)
   ///   11: 弹性公网 IP, 绑定了云主机
   ///   12: 弹性公网 IP, 绑定了负载均衡
   ///   13: 弹性公网 IP, 绑定了原生容器实例
   ///   14: 弹性公网 IP, 绑定了原生容器 Pod
   ///   2: 云物理服务器公网 IP
@property (strong,nonatomic,nonnull)  NSNumber*  resourceType;


-(id) initWithIp:(NSString*) ip
    resourceType:(NSNumber*)resourceType;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface RenameInstanceSpec :NSObject

/// 实例名称
@property (strong,nonatomic,nonnull)  NSString*  name;


-(id) initWithName:(NSString*) name;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface CertificateSpec :NSObject

/// 证书名称
@property (strong,nonatomic,nonnull)  NSString*  name;

/// 证书内容
@property (strong,nonatomic,nonnull)  NSString*  content;

/// 私钥
@property (strong,nonatomic,nonnull)  NSString*  rsaKey;


-(id) initWithName:(NSString*) name
    content:(NSString*)content
    rsaKey:(NSString*)rsaKey;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface ForwardBlackListRule :NSObject

/// 是否开启, 0: 关闭, 1: 开启
@property (strong,nonatomic,nonnull)  NSNumber*  status;

/// 引用的 IP 黑白名单 Id
@property (strong,nonatomic,nonnull)  NSString*  ipSetId;

/// 引用的 IP 黑白名单名称
@property (strong,nonatomic,nonnull)  NSString*  ipSetName;

/// 为 IP 或 IP 段的数组
@property (strong,nonatomic,nonnull)  NSArray<NSString*>*  ip;


-(id) initWithStatus:(NSNumber*) status
    ipSetId:(NSString*)ipSetId
    ipSetName:(NSString*)ipSetName
    ip:(NSArray<NSString*>*)ip;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface AttackTypeCount :NSObject

/// 攻击类型
@property (strong,nonatomic,nonnull)  NSString*  type;

/// 攻击次数
@property (strong,nonatomic,nonnull)  NSNumber*  count;


-(id) initWithType:(NSString*) type
    count:(NSNumber*)count;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface CCAttackLogDetail :NSObject

/// 特征key
@property (strong,nonatomic,nonnull)  NSString*  key;

/// 攻击次数
@property (strong,nonatomic,nonnull)  NSNumber*  num;


-(id) initWithKey:(NSString*) key
    num:(NSNumber*)num;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface IpSet :NSObject

/// IP 黑白名单 Id
@property (strong,nonatomic,nonnull)  NSString*  idValue;

/// IP 黑白名单的名称
@property (strong,nonatomic,nonnull)  NSString*  name;

/// IP 或 IP 段的数组
@property (strong,nonatomic,nonnull)  NSArray<NSString*>*  ip;


-(id) initWithId:(NSString*) idValue
    name:(NSString*)name
    ip:(NSArray<NSString*>*)ip;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface ProtectionOutline :NSObject

/// 实例数量
@property (strong,nonatomic,nonnull)  NSNumber*  instancesCount;

/// 已防护实例数量
@property (strong,nonatomic,nonnull)  NSNumber*  protectedCount;

/// 已防护天数
@property (strong,nonatomic,nonnull)  NSNumber*  protectedDay;

/// 7 日攻击次数
@property (strong,nonatomic,nonnull)  NSNumber*  weekAttackCount;

/// 7 日攻击流量峰值
@property (strong,nonatomic,nonnull)  NSNumber*  weekAttackPeak;

/// 7 日攻击流量单位
@property (strong,nonatomic,nonnull)  NSString*  weekAttackUnit;

/// 30 日攻击次数
@property (strong,nonatomic,nonnull)  NSNumber*  monthAttackCount;

/// 30 日攻击流量峰值
@property (strong,nonatomic,nonnull)  NSNumber*  monthAttackPeak;

/// 30 日攻击流量单位
@property (strong,nonatomic,nonnull)  NSString*  monthAttackUnit;


-(id) initWithInstancesCount:(NSNumber*) instancesCount
    protectedCount:(NSNumber*)protectedCount
    protectedDay:(NSNumber*)protectedDay
    weekAttackCount:(NSNumber*)weekAttackCount
    weekAttackPeak:(NSNumber*)weekAttackPeak
    weekAttackUnit:(NSString*)weekAttackUnit
    monthAttackCount:(NSNumber*)monthAttackCount
    monthAttackPeak:(NSNumber*)monthAttackPeak
    monthAttackUnit:(NSString*)monthAttackUnit;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface DDoSAttackLog :NSObject

/// 攻击流量大小
@property (strong,nonatomic,nonnull)  NSNumber*  attackTraffic;

/// 是否触发黑洞，0否 1是
@property (strong,nonatomic,nonnull)  NSNumber*  blackHole;

/// 攻击开始时间
@property (strong,nonatomic,nonnull)  NSString*  startTime;

/// 攻击结束时间
@property (strong,nonatomic,nonnull)  NSString*  endTime;

/// 流量单位，bps、Kbps、Mbps、Gbps
@property (strong,nonatomic,nonnull)  NSString*  unit;

/// 高防实例id
@property (strong,nonatomic,nonnull)  NSString*  instanceId;

/// 高防实例名称
@property (strong,nonatomic,nonnull)  NSString*  name;


-(id) initWithAttackTraffic:(NSNumber*) attackTraffic
    blackHole:(NSNumber*)blackHole
    startTime:(NSString*)startTime
    endTime:(NSString*)endTime
    unit:(NSString*)unit
    instanceId:(NSString*)instanceId
    name:(NSString*)name;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface CertInfoDescribeSpec :NSObject

/// 域名
@property (strong,nonatomic,nonnull)  NSString*  domain;

/// 证书内容
@property (strong,nonatomic,nonnull)  NSString*  httpsCertContent;


-(id) initWithDomain:(NSString*) domain
    httpsCertContent:(NSString*)httpsCertContent;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface IpBwListSpec :NSObject

/// IP 或 IP 段列表
@property (strong,nonatomic,nonnull)  NSArray<NSString*>*  ipList;

/// false 时强制写入, true 时有重复则不写入
@property (strong,nonatomic,nonnull)  NSNumber*  tryFlag;


-(id) initWithIpList:(NSArray<NSString*>*) ipList
    tryFlag:(NSNumber*)tryFlag;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface Geo :NSObject

/// geo 拦截地域
@property (strong,nonatomic,nonnull)  NSString*  label;

/// geo 拦截地域编码
@property (strong,nonatomic,nonnull)  NSString*  value;


-(id) initWithLabel:(NSString*) label
    value:(NSString*)value;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface CCProtectionRuleSpec :NSObject

/// CC 防护规则名称, 不允许为空, 长度不超过 32 个字符, 支持中文, 大小写字母, 数字及字符&#39;-&#39;、&#39;/&#39;、&#39;.&#39;、&#39;_&#39;
@property (strong,nonatomic,nonnull)  NSString*  name;

/// uri, 不允许为空, 以 / 开头, 长度不超过 2048 个字符
@property (strong,nonatomic,nonnull)  NSString*  uri;

/// 匹配 uri 类型, 0: 精确匹配, 1: 前缀匹配
@property (strong,nonatomic,nonnull)  NSNumber*  matchType;

/// 检测周期, 单位为秒, 取值范围[5, 10800]
@property (strong,nonatomic,nonnull)  NSNumber*  detectPeriod;

/// ip 访问次数, 取值范围[2, 2000]
@property (strong,nonatomic,nonnull)  NSNumber*  singleIpLimit;

/// 阻断类型, 1: 封禁, 2: 人机交互
@property (strong,nonatomic,nonnull)  NSNumber*  blockType;

/// 阻断持续时间, 单位为秒, 取值范围[10, 86400]
@property (strong,nonatomic,nonnull)  NSNumber*  blockTime;


-(id) initWithName:(NSString*) name
    uri:(NSString*)uri
    matchType:(NSNumber*)matchType
    detectPeriod:(NSNumber*)detectPeriod
    singleIpLimit:(NSNumber*)singleIpLimit
    blockType:(NSNumber*)blockType
    blockTime:(NSNumber*)blockTime;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface CCProtectionDefaultConfig :NSObject

/// HTTP 请求数阈值
@property (strong,nonatomic,nonnull)  NSNumber*  ccThreshold;

/// Host 的防护阈值
@property (strong,nonatomic,nonnull)  NSNumber*  hostQps;

/// Host + Url 的防护阈值
@property (strong,nonatomic,nonnull)  NSNumber*  hostUrlQps;

/// 每个源 IP 对 Host 的防护阈值
@property (strong,nonatomic,nonnull)  NSNumber*  ipHostQps;

/// 每个源 IP 对 Host + Url 的防护阈值
@property (strong,nonatomic,nonnull)  NSNumber*  ipHostUrlQps;


-(id) initWithCcThreshold:(NSNumber*) ccThreshold
    hostQps:(NSNumber*)hostQps
    hostUrlQps:(NSNumber*)hostUrlQps
    ipHostQps:(NSNumber*)ipHostQps
    ipHostUrlQps:(NSNumber*)ipHostUrlQps;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface InstanceIdName :NSObject

/// 实例id
@property (strong,nonatomic,nonnull)  NSString*  idValue;

/// 实例名称
@property (strong,nonatomic,nonnull)  NSString*  name;


-(id) initWithId:(NSString*) idValue
    name:(NSString*)name;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface AlarmConfig :NSObject

/// 黑洞告警邮件开关 0 关闭 1 开启
@property (strong,nonatomic,nonnull)  NSNumber*  blackHoleAlarmEmailStatus;

/// 黑洞告警短信开关 0 关闭 1 开启
@property (strong,nonatomic,nonnull)  NSNumber*  blackHoleAlarmSmsStatus;

/// 黑洞告警总开关  0 关闭 1 开启
@property (strong,nonatomic,nonnull)  NSNumber*  blackHoleAlarmStatus;

/// DDos 攻击告警邮件开关  0 关闭 1 开启
@property (strong,nonatomic,nonnull)  NSNumber*  ddosAlarmEmailStatus;

/// DDos 攻击告警短信开关  0 关闭 1 开启
@property (strong,nonatomic,nonnull)  NSNumber*  ddosAlarmSmsStatus;

/// DDos 告警总开关 0 关闭 1 开启
@property (strong,nonatomic,nonnull)  NSNumber*  ddosAlarmStatus;

/// 错误码告警总开关
@property (strong,nonatomic,nonnull)  NSNumber*  errorCodeAlarmStatus;

/// 错误码告警域名列表
@property (strong,nonatomic,nonnull)  NSArray<NSString*>*  errorCodeDomain;


-(id) initWithBlackHoleAlarmEmailStatus:(NSNumber*) blackHoleAlarmEmailStatus
    blackHoleAlarmSmsStatus:(NSNumber*)blackHoleAlarmSmsStatus
    blackHoleAlarmStatus:(NSNumber*)blackHoleAlarmStatus
    ddosAlarmEmailStatus:(NSNumber*)ddosAlarmEmailStatus
    ddosAlarmSmsStatus:(NSNumber*)ddosAlarmSmsStatus
    ddosAlarmStatus:(NSNumber*)ddosAlarmStatus
    errorCodeAlarmStatus:(NSNumber*)errorCodeAlarmStatus
    errorCodeDomain:(NSArray<NSString*>*)errorCodeDomain;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface PriceSpec :NSObject

/// 操作类型 1: 新购高防实例, 3: 升级高防实例
@property (strong,nonatomic,nonnull)  NSNumber*  buyType;

/// 计费类型 1: 按配置 2: 按用量 3: 包年包月
@property (strong,nonatomic,nonnull)  NSNumber*  billingType;

/// 链路类型, 1: 电信, 2: 电信、联通, 3: 电信、联通和移动
@property (strong,nonatomic,nonnull)  NSNumber*  carrier;

/// 业务带宽: 100, 150, 200, 250, ..., 2000, 单位: M
@property (strong,nonatomic,nonnull)  NSNumber*  bw;

/// 保底带宽: 0, 10, 20, 30, 40, 50, 60, 80, 100, 单位: Gbps
@property (strong,nonatomic,nonnull)  NSNumber*  bp;

/// 弹性带宽: 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 120, 150, 200, 单位: Gbps
@property (strong,nonatomic,nonnull)  NSNumber*  ep;

/// 实例 Id, 升级高防实例查询价格时必传
@property (strong,nonatomic,nonnull)  NSString*  idValue;

/// 购买防护包时长, 新购高防实例时必传
   /// - timeUnit 为 3 时, 可取值 1-9
   /// - timeUnit 为 4 时, 可取值 1-3
   /// 
@property (strong,nonatomic,nonnull)  NSNumber*  timeSpan;

/// 购买时长类型, 新购高防实例时必传
   /// - 3: 月
   /// - 4: 年
@property (strong,nonatomic,nonnull)  NSNumber*  timeUnit;


-(id) initWithBuyType:(NSNumber*) buyType
    billingType:(NSNumber*)billingType
    carrier:(NSNumber*)carrier
    bw:(NSNumber*)bw
    bp:(NSNumber*)bp
    ep:(NSNumber*)ep
    idValue:(NSString*)idValue
    timeSpan:(NSNumber*)timeSpan
    timeUnit:(NSNumber*)timeUnit;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface WebBlackListRuleSpec :NSObject

/// 黑名单规则名称
@property (strong,nonatomic,nonnull)  NSString*  name;

/// 模式:&lt;br&gt;- 0: uri&lt;br&gt;- 1: ip&lt;br&gt;- 2: cookie&lt;br&gt;- 3: geo&lt;br&gt;- 4: header
@property (strong,nonatomic,nonnull)  NSNumber*  mode;

/// 匹配 key. mode 为 cookie 和 header 时必传.
   /// - mode 为 cookie 时, 传 cookie 的 name
   /// - mode 为 header 时, 传 header 的 key
   /// 
@property (strong,nonatomic,nonnull)  NSString*  key;

/// 匹配 value.
   /// - mode 为 uri 时, 传要匹配的 uri
   /// - mode 为 ip 时, 传引用的 ip 黑白名单 Id
   /// - mode 为 cookie 时, 传 cookie 的 value
   /// - mode 为 geo 时, 传 geo 区域编码以 &#39;,&#39; 分隔的字符串. 查询 &lt;a href&#x3D;&quot;http://docs.jdcloud.com/anti-ddos-pro/api/describegeoareas&quot;&gt;describeGeoAreas&lt;/a&gt; 接口获取可设置的地域编码列表
   /// - mode 为 header 时, 传 header 的 value
   /// 
@property (strong,nonatomic,nonnull)  NSString*  value;

/// 匹配规则. mode 为 uri, cookie 和 header 时必传. 支持以下匹配规则
   /// - 0: 完全匹配
   /// - 1: 前缀匹配
   /// - 2: 包含
   /// - 3: 正则匹配
   /// - 4: 后缀匹配
   /// 
@property (strong,nonatomic,nonnull)  NSNumber*  pattern;

/// 命中后处理动作
   /// - 0: 阻断
   /// - 1: 跳转
   /// - 2: 验证码
   /// 
@property (strong,nonatomic,nonnull)  NSNumber*  action;

/// 命中后处理值, action 为 1 时传跳转路径
   /// 
@property (strong,nonatomic,nonnull)  NSString*  actionValue;

/// 规则状态.
   /// - 0: 关闭
   /// - 1: 开启
   /// 
@property (strong,nonatomic,nonnull)  NSNumber*  status;


-(id) initWithName:(NSString*) name
    mode:(NSNumber*)mode
    key:(NSString*)key
    value:(NSString*)value
    pattern:(NSNumber*)pattern
    action:(NSNumber*)action
    actionValue:(NSString*)actionValue
    status:(NSNumber*)status;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface Instance :NSObject

/// 实例 ID
@property (strong,nonatomic,nonnull)  NSString*  idValue;

/// 实例名称
@property (strong,nonatomic,nonnull)  NSString*  name;

/// 链路类型, 1: 电信, 2: 电信、联通, 3: 电信、联通和移动
@property (strong,nonatomic,nonnull)  NSNumber*  carrier;

/// 可防护 IP 类型, 目前仅电信线路支持 IPV6 线路:
   /// - 0: IPV4,
   /// - 1: IPV4/IPV6
   /// 
@property (strong,nonatomic,nonnull)  NSNumber*  ipType;

/// 触发弹性带宽的次数
@property (strong,nonatomic,nonnull)  NSNumber*  elasticTriggerCount;

/// 超峰次数
@property (strong,nonatomic,nonnull)  NSNumber*  abovePeakCount;

/// 保底带宽
@property (strong,nonatomic,nonnull)  NSNumber*  inBitslimit;

/// 弹性带宽
@property (strong,nonatomic,nonnull)  NSNumber*  resilientBitslimit;

/// 业务带宽大小
@property (strong,nonatomic,nonnull)  NSNumber*  businessBitslimit;

/// CC 阈值大小
@property (strong,nonatomic,nonnull)  NSNumber*  ccThreshold;

/// CC 防护峰值, 单位: QPS
@property (strong,nonatomic,nonnull)  NSNumber*  ccPeakQPS;

/// 非网站类规则数
@property (strong,nonatomic,nonnull)  NSNumber*  ruleCount;

/// 网站类规则数
@property (strong,nonatomic,nonnull)  NSNumber*  webRuleCount;

/// PAID|ARREARS|EXPIRED
@property (strong,nonatomic,nonnull)  NSString*  chargeStatus;

/// SAFE|CLEANING|BLOCKING
@property (strong,nonatomic,nonnull)  NSString*  securityStatus;

/// 实例的创建的时间
@property (strong,nonatomic,nonnull)  NSString*  createTime;

/// 实例的过期时间
@property (strong,nonatomic,nonnull)  NSString*  expireTime;

/// 资源 ID, 升级和续费时使用
@property (strong,nonatomic,nonnull)  NSString*  resourceId;

/// CC 防护观察者模式.
   /// - 0: 关闭
   /// - 1: 开启
   /// 
@property (strong,nonatomic,nonnull)  NSNumber*  ccObserveMode;

/// CC 防护模式.
   /// - 0: 正常
   /// - 1: 紧急
   /// - 2: 宽松
   /// - 3: 自定义
   /// 
@property (strong,nonatomic,nonnull)  NSNumber*  ccProtectMode;

/// CC 开关状态.
   /// - 0: 关闭
   /// - 1: 开启
   /// 
@property (strong,nonatomic,nonnull)  NSNumber*  ccProtectStatus;

/// CC 防护模式为自定义时的限速大小
@property (strong,nonatomic,nonnull)  NSNumber*  ccSpeedLimit;

/// CC 防护模式为自定义时的限速周期
@property (strong,nonatomic,nonnull)  NSNumber*  ccSpeedPeriod;

/// IP 黑名单列表
@property (strong,nonatomic,nonnull)  NSArray<NSString*>*  ipBlackList;

/// IP 黑名单状态.
   /// - 0: 关闭
   /// - 1: 开启
   /// 
@property (strong,nonatomic,nonnull)  NSNumber*  ipBlackStatus;

/// IP 白名单列表
@property (strong,nonatomic,nonnull)  NSArray<NSString*>*  ipWhiteList;

/// IP 白名单状态.
   /// - 0: 关闭
   /// - 1: 开启
   /// 
@property (strong,nonatomic,nonnull)  NSNumber*  ipWhiteStatus;

/// url白名单列表
@property (strong,nonatomic,nonnull)  NSArray<NSString*>*  urlWhitelist;

/// url白名单状态，0关闭，1开启
@property (strong,nonatomic,nonnull)  NSNumber*  urlWhitelistStatus;

/// ccProtectMode为自定义模式时，每个Host的防护阈值
@property (strong,nonatomic,nonnull)  NSNumber*  hostQps;

/// ccProtectMode为自定义模式时，每个Host+URI的防护阈值
@property (strong,nonatomic,nonnull)  NSNumber*  hostUrlQps;

/// ccProtectMode为自定义模式时，每个源IP对Host的防护阈值
@property (strong,nonatomic,nonnull)  NSNumber*  ipHostQps;

/// ccProtectMode为自定义模式时，每个源IP对Host+URI的防护阈值
@property (strong,nonatomic,nonnull)  NSNumber*  ipHostUrlQps;


-(id) initWithId:(NSString*) idValue
    name:(NSString*)name
    carrier:(NSNumber*)carrier
    ipType:(NSNumber*)ipType
    elasticTriggerCount:(NSNumber*)elasticTriggerCount
    abovePeakCount:(NSNumber*)abovePeakCount
    inBitslimit:(NSNumber*)inBitslimit
    resilientBitslimit:(NSNumber*)resilientBitslimit
    businessBitslimit:(NSNumber*)businessBitslimit
    ccThreshold:(NSNumber*)ccThreshold
    ccPeakQPS:(NSNumber*)ccPeakQPS
    ruleCount:(NSNumber*)ruleCount
    webRuleCount:(NSNumber*)webRuleCount
    chargeStatus:(NSString*)chargeStatus
    securityStatus:(NSString*)securityStatus
    createTime:(NSString*)createTime
    expireTime:(NSString*)expireTime
    resourceId:(NSString*)resourceId
    ccObserveMode:(NSNumber*)ccObserveMode
    ccProtectMode:(NSNumber*)ccProtectMode
    ccProtectStatus:(NSNumber*)ccProtectStatus
    ccSpeedLimit:(NSNumber*)ccSpeedLimit
    ccSpeedPeriod:(NSNumber*)ccSpeedPeriod
    ipBlackList:(NSArray<NSString*>*)ipBlackList
    ipBlackStatus:(NSNumber*)ipBlackStatus
    ipWhiteList:(NSArray<NSString*>*)ipWhiteList
    ipWhiteStatus:(NSNumber*)ipWhiteStatus
    urlWhitelist:(NSArray<NSString*>*)urlWhitelist
    urlWhitelistStatus:(NSNumber*)urlWhitelistStatus
    hostQps:(NSNumber*)hostQps
    hostUrlQps:(NSNumber*)hostUrlQps
    ipHostQps:(NSNumber*)ipHostQps
    ipHostUrlQps:(NSNumber*)ipHostUrlQps;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface CCProtectionConfig :NSObject

/// 网站规则的 CC 防护状态, 0: 关闭, 1: 开启
@property (strong,nonatomic,nonnull)  NSNumber*  enable;

/// 观察者模式, 0: 关闭, 1: 开启
@property (strong,nonatomic,nonnull)  NSNumber*  observerMode;

/// 防护等级, 0: 正常, 1: 宽松, 2: 紧急, 3: 自定义
@property (strong,nonatomic,nonnull)  NSNumber*  level;

/// HTTP 请求数阈值
@property (strong,nonatomic,nonnull)  NSNumber*  ccThreshold;

/// Host 的防护阈值
@property (strong,nonatomic,nonnull)  NSNumber*  hostQps;

/// Host + Url 的防护阈值
@property (strong,nonatomic,nonnull)  NSNumber*  hostUrlQps;

/// 每个源 IP 对 Host 的防护阈值
@property (strong,nonatomic,nonnull)  NSNumber*  ipHostQps;

/// 每个源 IP 对 Host + Url 的防护阈值
@property (strong,nonatomic,nonnull)  NSNumber*  ipHostUrlQps;

/// 开启的 cc 防护规则数量
@property (strong,nonatomic,nonnull)  NSNumber*  ccProtectionRuleEnableCount;


-(id) initWithEnable:(NSNumber*) enable
    observerMode:(NSNumber*)observerMode
    level:(NSNumber*)level
    ccThreshold:(NSNumber*)ccThreshold
    hostQps:(NSNumber*)hostQps
    hostUrlQps:(NSNumber*)hostUrlQps
    ipHostQps:(NSNumber*)ipHostQps
    ipHostUrlQps:(NSNumber*)ipHostUrlQps
    ccProtectionRuleEnableCount:(NSNumber*)ccProtectionRuleEnableCount;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface ModifyWhiteListRuleOfForwardRuleSpec :NSObject

/// 待引用的 IP 黑白名单 Id
@property (strong,nonatomic,nonnull)  NSString*  ipSetId;


-(id) initWithIpSetId:(NSString*) ipSetId;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface CCProtectionConfigSpec :NSObject

/// 防护等级, 0: 正常, 1: 宽松, 2: 紧急, 3: 自定义
@property (strong,nonatomic,nonnull)  NSNumber*  level;

/// HTTP 请求数阈值, 防护等级为自定义时必传
@property (strong,nonatomic,nonnull)  NSNumber*  ccThreshold;

/// Host 的防护阈值, 防护等级为自定义时必传
@property (strong,nonatomic,nonnull)  NSNumber*  hostQps;

/// Host + Url 的防护阈值, 防护等级为自定义时必传
@property (strong,nonatomic,nonnull)  NSNumber*  hostUrlQps;

/// 每个源 IP 对 Host 的防护阈值, 防护等级为自定义时必传
@property (strong,nonatomic,nonnull)  NSNumber*  ipHostQps;

/// 每个源 IP 对 Host + Url 的防护阈值, 防护等级为自定义时必传
@property (strong,nonatomic,nonnull)  NSNumber*  ipHostUrlQps;


-(id) initWithLevel:(NSNumber*) level
    ccThreshold:(NSNumber*)ccThreshold
    hostQps:(NSNumber*)hostQps
    hostUrlQps:(NSNumber*)hostUrlQps
    ipHostQps:(NSNumber*)ipHostQps
    ipHostUrlQps:(NSNumber*)ipHostUrlQps;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface BwRepeatMsg :NSObject

/// 黑名单重复 IP/IP段
@property (strong,nonatomic,nonnull)  NSString*  black;

/// 白名单重复 IP/IP段
@property (strong,nonatomic,nonnull)  NSString*  white;


-(id) initWithBlack:(NSString*) black
    white:(NSString*)white;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface CertInfo :NSObject

/// 通用名称
@property (strong,nonatomic,nonnull)  NSString*  domain;

/// 证书生效时间
@property (strong,nonatomic,nonnull)  NSString*  from;

/// 证书到期时间
@property (strong,nonatomic,nonnull)  NSString*  to;

/// 证书组织
@property (strong,nonatomic,nonnull)  NSString*  user;

/// 加密算法
@property (strong,nonatomic,nonnull)  NSString*  sigAlgName;

/// 颁发者
@property (strong,nonatomic,nonnull)  NSString*  issuer;


-(id) initWithDomain:(NSString*) domain
    from:(NSString*)from
    to:(NSString*)to
    user:(NSString*)user
    sigAlgName:(NSString*)sigAlgName
    issuer:(NSString*)issuer;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface ForwardProtectionRuleSpec :NSObject

/// 虚假源与空连接, 0: 关闭, 1: 开启
@property (strong,nonatomic,nonnull)  NSNumber*  spoofIpEnable;

/// 源新建连接限速, 0: 关闭, 1: 开启
@property (strong,nonatomic,nonnull)  NSNumber*  srcNewConnLimitEnable;

/// 源新建连接速率
@property (strong,nonatomic,nonnull)  NSNumber*  srcNewConnLimitValue;

/// 源并发连接限速, 0: 关闭, 1: 开启
@property (strong,nonatomic,nonnull)  NSNumber*  srcConcurrentConnLimitEnable;

/// 源并发连接速率
@property (strong,nonatomic,nonnull)  NSNumber*  srcConcurrentConnLimitValue;

/// 目的新建连接, 0: 关闭, 1: 开启
@property (strong,nonatomic,nonnull)  NSNumber*  dstNewConnLimitEnable;

/// 目的新建连接速率
@property (strong,nonatomic,nonnull)  NSNumber*  dstNewConnLimitValue;

/// 目的并发连接, 0: 关闭, 1: 开启
@property (strong,nonatomic,nonnull)  NSNumber*  dstConcurrentConnLimitEnable;

/// 目的并发连接速率
@property (strong,nonatomic,nonnull)  NSNumber*  dstConcurrentConnLimitValue;

/// 报文最小长度, 取值范围[0, datagramRangeMax)
@property (strong,nonatomic,nonnull)  NSNumber*  datagramRangeMin;

/// 报文最大长度, 取值范围(datagramRangeMin, 1518]
@property (strong,nonatomic,nonnull)  NSNumber*  datagramRangeMax;

/// geo 拦截地域编码列表. 查询 &lt;a href&#x3D;&quot;http://docs.jdcloud.com/anti-ddos-pro/api/describegeoareas&quot;&gt;describeGeoAreas&lt;/a&gt; 接口获取可设置的地域编码列表
@property (strong,nonatomic,nonnull)  NSArray<NSString*>*  geoBlackList;


-(id) initWithSpoofIpEnable:(NSNumber*) spoofIpEnable
    srcNewConnLimitEnable:(NSNumber*)srcNewConnLimitEnable
    srcNewConnLimitValue:(NSNumber*)srcNewConnLimitValue
    srcConcurrentConnLimitEnable:(NSNumber*)srcConcurrentConnLimitEnable
    srcConcurrentConnLimitValue:(NSNumber*)srcConcurrentConnLimitValue
    dstNewConnLimitEnable:(NSNumber*)dstNewConnLimitEnable
    dstNewConnLimitValue:(NSNumber*)dstNewConnLimitValue
    dstConcurrentConnLimitEnable:(NSNumber*)dstConcurrentConnLimitEnable
    dstConcurrentConnLimitValue:(NSNumber*)dstConcurrentConnLimitValue
    datagramRangeMin:(NSNumber*)datagramRangeMin
    datagramRangeMax:(NSNumber*)datagramRangeMax
    geoBlackList:(NSArray<NSString*>*)geoBlackList;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface ModifyInstanceEPBSpec :NSObject

/// 弹性带宽: 单位 Gbps
@property (strong,nonatomic,nonnull)  NSNumber*  ep;


-(id) initWithEp:(NSNumber*) ep;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface EPBSpec :NSObject

/// 弹性防护带宽
@property (strong,nonatomic,nonnull)  NSNumber*  ePB;


-(id) initWithEPB:(NSNumber*) ePB;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface AlarmConfigSpec :NSObject

/// 黑洞告警邮件开关 0 关闭 1 开启
@property (strong,nonatomic,nonnull)  NSNumber*  blackHoleAlarmEmailStatus;

/// 黑洞告警短信开关 0 关闭 1 开启
@property (strong,nonatomic,nonnull)  NSNumber*  blackHoleAlarmSmsStatus;

/// 黑洞告警总开关  0 关闭 1 开启
@property (strong,nonatomic,nonnull)  NSNumber*  blackHoleAlarmStatus;

/// DDos 攻击告警邮件开关  0 关闭 1 开启
@property (strong,nonatomic,nonnull)  NSNumber*  ddosAlarmEmailStatus;

/// DDos 攻击告警短信开关  0 关闭 1 开启
@property (strong,nonatomic,nonnull)  NSNumber*  ddosAlarmSmsStatus;

/// DDos 告警总开关 0 关闭 1 开启
@property (strong,nonatomic,nonnull)  NSNumber*  ddosAlarmStatus;

/// 错误码告警总开关
@property (strong,nonatomic,nonnull)  NSNumber*  errorCodeAlarmStatus;

/// 错误码告警域名列表
@property (strong,nonatomic,nonnull)  NSArray<NSString*>*  errorCodeDomain;


-(id) initWithBlackHoleAlarmEmailStatus:(NSNumber*) blackHoleAlarmEmailStatus
    blackHoleAlarmSmsStatus:(NSNumber*)blackHoleAlarmSmsStatus
    blackHoleAlarmStatus:(NSNumber*)blackHoleAlarmStatus
    ddosAlarmEmailStatus:(NSNumber*)ddosAlarmEmailStatus
    ddosAlarmSmsStatus:(NSNumber*)ddosAlarmSmsStatus
    ddosAlarmStatus:(NSNumber*)ddosAlarmStatus
    errorCodeAlarmStatus:(NSNumber*)errorCodeAlarmStatus
    errorCodeDomain:(NSArray<NSString*>*)errorCodeDomain;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface Certificate :NSObject

/// 证书 Id
@property (strong,nonatomic,nonnull)  NSString*  idValue;

/// 证书名称
@property (strong,nonatomic,nonnull)  NSString*  name;

/// 证书
@property (strong,nonatomic,nonnull)  NSString*  content;

/// 秘钥
@property (strong,nonatomic,nonnull)  NSString*  rsaKey;

/// 绑定域名
@property (strong,nonatomic,nonnull)  NSString*  domain;

/// 证书生效时间
@property (strong,nonatomic,nonnull)  NSString*  from;

/// 证书到期时间
@property (strong,nonatomic,nonnull)  NSString*  to;

/// 加密算法
@property (strong,nonatomic,nonnull)  NSString*  sigAlgName;

/// 颁发者
@property (strong,nonatomic,nonnull)  NSString*  issuer;

/// 颁发给
@property (strong,nonatomic,nonnull)  NSString*  organization;

/// 上传时间
@property (strong,nonatomic,nonnull)  NSString*  uploadTime;

/// 已关联域名
@property (strong,nonatomic,nonnull)  NSArray<NSString*>*  associatedDomains;

/// 推荐域名
@property (strong,nonatomic,nonnull)  NSArray<NSString*>*  sanDomains;


-(id) initWithId:(NSString*) idValue
    name:(NSString*)name
    content:(NSString*)content
    rsaKey:(NSString*)rsaKey
    domain:(NSString*)domain
    from:(NSString*)from
    to:(NSString*)to
    sigAlgName:(NSString*)sigAlgName
    issuer:(NSString*)issuer
    organization:(NSString*)organization
    uploadTime:(NSString*)uploadTime
    associatedDomains:(NSArray<NSString*>*)associatedDomains
    sanDomains:(NSArray<NSString*>*)sanDomains;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface ForwardWhiteListRule :NSObject

/// 是否开启, 0: 关闭, 1: 开启
@property (strong,nonatomic,nonnull)  NSNumber*  status;

/// 引用的 IP 黑白名单 Id
@property (strong,nonatomic,nonnull)  NSString*  ipSetId;

/// 引用的 IP 黑白名单名称
@property (strong,nonatomic,nonnull)  NSString*  ipSetName;

/// IP 或 IP 段的数组
@property (strong,nonatomic,nonnull)  NSArray<NSString*>*  ip;


-(id) initWithStatus:(NSNumber*) status
    ipSetId:(NSString*)ipSetId
    ipSetName:(NSString*)ipSetName
    ip:(NSArray<NSString*>*)ip;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface CCAttackLog :NSObject

/// CC 攻击记录Id
@property (strong,nonatomic,nonnull)  NSString*  attackId;

/// 攻击流量大小
@property (strong,nonatomic,nonnull)  NSNumber*  attackTraffic;

/// 是否触发黑洞，0否 1是
@property (strong,nonatomic,nonnull)  NSNumber*  blackHole;

/// 攻击开始时间
@property (strong,nonatomic,nonnull)  NSString*  startTime;

/// 攻击结束时间
@property (strong,nonatomic,nonnull)  NSString*  endTime;

/// 流量单位，bps、Kbps、Mbps、Gbps
@property (strong,nonatomic,nonnull)  NSString*  unit;

/// 高防实例id
@property (strong,nonatomic,nonnull)  NSString*  instanceId;

/// 高防实例名称
@property (strong,nonatomic,nonnull)  NSString*  name;


-(id) initWithAttackId:(NSString*) attackId
    attackTraffic:(NSNumber*)attackTraffic
    blackHole:(NSNumber*)blackHole
    startTime:(NSString*)startTime
    endTime:(NSString*)endTime
    unit:(NSString*)unit
    instanceId:(NSString*)instanceId
    name:(NSString*)name;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface IpSetSpec :NSObject

/// IP 黑白名单名称
@property (strong,nonatomic,nonnull)  NSString*  name;

/// IP 或 IP 段的数组
@property (strong,nonatomic,nonnull)  NSArray<NSString*>*  ip;


-(id) initWithName:(NSString*) name
    ip:(NSArray<NSString*>*)ip;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface CertInfoModifySpec :NSObject

/// 证书 Id
   /// - 如果传 certId, 请确认已经上传了相应的证书
   /// - certId 缺省时网站规则将使用 httpsCertContent, httpsRsaKey 对应的证书
   /// 
@property (strong,nonatomic,nonnull)  NSString*  certId;

/// 证书内容
@property (strong,nonatomic,nonnull)  NSString*  httpsCertContent;

/// 私钥
@property (strong,nonatomic,nonnull)  NSString*  httpsRsaKey;


-(id) initWithCertId:(NSString*) certId
    httpsCertContent:(NSString*)httpsCertContent
    httpsRsaKey:(NSString*)httpsRsaKey;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface Status :NSObject

/// 请求结果, 0 表示成功, 非 0 表示失败
@property (strong,nonatomic,nonnull)  NSNumber*  retcode;

/// 请求错误码
@property (strong,nonatomic,nonnull)  NSNumber*  code;

/// 请求错误消息
@property (strong,nonatomic,nonnull)  NSString*  msg;


-(id) initWithRetcode:(NSNumber*) retcode
    code:(NSNumber*)code
    msg:(NSString*)msg;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface CCDefaultThresholds :NSObject

/// 每个 Host 的防护阈值
@property (strong,nonatomic,nonnull)  NSNumber*  hostQps;

/// 每个 Host + URL 的防护阈值
@property (strong,nonatomic,nonnull)  NSNumber*  hostUrlQps;

/// 每个源 IP 对 Host 的防护阈值
@property (strong,nonatomic,nonnull)  NSNumber*  ipHostQps;

/// 每个源 IP 对 Host + URI 的防护阈值
@property (strong,nonatomic,nonnull)  NSNumber*  ipHostUrlQps;


-(id) initWithHostQps:(NSNumber*) hostQps
    hostUrlQps:(NSNumber*)hostUrlQps
    ipHostQps:(NSNumber*)ipHostQps
    ipHostUrlQps:(NSNumber*)ipHostUrlQps;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface CreateInstanceSpec :NSObject

/// 实例 Id, 升级时必传
@property (strong,nonatomic,nonnull)  NSString*  idValue;

/// 实例名称, 新购时必传
@property (strong,nonatomic,nonnull)  NSString*  name;

/// 购买类型：1新购 3升级
@property (strong,nonatomic,nonnull)  NSNumber*  buyType;

/// 链路类型, 1: 电信, 2: 电信、联通, 3: 电信、联通和移动
@property (strong,nonatomic,nonnull)  NSNumber*  carrier;

/// 可防护 ip 类型, 目前仅电信线路支持 IPV6 线路:
   /// - 0: IPV4,
   /// - 1: IPV4/IPV6
   /// 
@property (strong,nonatomic,nonnull)  NSNumber*  ipType;

/// 保底带宽：单位Gbps
@property (strong,nonatomic,nonnull)  NSNumber*  bp;

/// 弹性带宽：单位Gbps
@property (strong,nonatomic,nonnull)  NSNumber*  ep;

/// 业务带宽：单位Mbps
@property (strong,nonatomic,nonnull)  NSNumber*  bw;

/// 购买防护包时长, 新购高防实例时必传
   /// - timeUnit 为 3 时, 可取值 1-9
   /// - timeUnit 为 4 时, 可取值 1-3
   /// 
@property (strong,nonatomic,nonnull)  NSNumber*  timeSpan;

/// 购买时长类型, 新购高防实例时必传
   /// - 3: 月
   /// - 4: 年
   /// 
@property (strong,nonatomic,nonnull)  NSNumber*  timeUnit;

/// 支付成功后跳转的页面，控制台交互模式传该字段
@property (strong,nonatomic,nonnull)  NSString*  returnUrl;


-(id) initWithId:(NSString*) idValue
    name:(NSString*)name
    buyType:(NSNumber*)buyType
    carrier:(NSNumber*)carrier
    ipType:(NSNumber*)ipType
    bp:(NSNumber*)bp
    ep:(NSNumber*)ep
    bw:(NSNumber*)bw
    timeSpan:(NSNumber*)timeSpan
    timeUnit:(NSNumber*)timeUnit
    returnUrl:(NSString*)returnUrl;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface ProtectionStatistics :NSObject

/// 实例数量
@property (strong,nonatomic,nonnull)  NSNumber*  instancesCount;

/// 已防护实例数量
@property (strong,nonatomic,nonnull)  NSNumber*  protectedCount;

/// 已防护天数
@property (strong,nonatomic,nonnull)  NSNumber*  protectedDay;


-(id) initWithInstancesCount:(NSNumber*) instancesCount
    protectedCount:(NSNumber*)protectedCount
    protectedDay:(NSNumber*)protectedDay;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface VpcIpResource :NSObject

/// 云内 IP 地址
@property (strong,nonatomic,nonnull)  NSString*  ip;

/// 是否绑定
@property (strong,nonatomic,nonnull)  NSNumber*  binded;

/// 公网 IP 类型或绑定资源类型:
   ///   0: 未知类型
   ///   1: 弹性公网 IP(IP 为弹性公网 IP, 绑定资源类型未知)
   ///   10: 弹性公网 IP(IP 为弹性公网 IP, 但未绑定资源)
   ///   11: 弹性公网 IP, 绑定了云主机
   ///   12: 弹性公网 IP, 绑定了负载均衡
   ///   13: 弹性公网 IP, 绑定了原生容器实例
   ///   14: 弹性公网 IP, 绑定了原生容器 Pod
   ///   2: 云物理服务器公网 IP
@property (strong,nonatomic,nonnull)  NSNumber*  resourceType;


-(id) initWithIp:(NSString*) ip
    binded:(NSNumber*)binded
    resourceType:(NSNumber*)resourceType;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface CCProtectionRule :NSObject

/// CC 防护规则 ID
@property (strong,nonatomic,nonnull)  NSString*  idValue;

/// CC 防护规则对应的网站规则 ID
@property (strong,nonatomic,nonnull)  NSString*  webRuleId;

/// CC 防护规则对应的实例 ID
@property (strong,nonatomic,nonnull)  NSString*  instanceId;

/// CC 防护规则名称, 30 字符以内
@property (strong,nonatomic,nonnull)  NSString*  name;

/// CC 防护规则状态: 0: 关闭, 1: 开启
@property (strong,nonatomic,nonnull)  NSNumber*  enable;

/// uri, 以 / 开头, 200 字符以内
@property (strong,nonatomic,nonnull)  NSString*  uri;

/// 匹配 uri 类型, 0: 精确匹配, 1: 前缀匹配
@property (strong,nonatomic,nonnull)  NSNumber*  matchType;

/// 检测周期, 单位为秒, 取值范围[5, 10800]
@property (strong,nonatomic,nonnull)  NSNumber*  detectPeriod;

/// ip 访问次数, 取值范围[2, 2000]
@property (strong,nonatomic,nonnull)  NSNumber*  singleIpLimit;

/// 阻断类型, 1: 封禁, 2: 人机交互
@property (strong,nonatomic,nonnull)  NSNumber*  blockType;

/// 阻断持续时间, 单位为秒, 取值范围[10, 86400]
@property (strong,nonatomic,nonnull)  NSNumber*  blockTime;


-(id) initWithId:(NSString*) idValue
    webRuleId:(NSString*)webRuleId
    instanceId:(NSString*)instanceId
    name:(NSString*)name
    enable:(NSNumber*)enable
    uri:(NSString*)uri
    matchType:(NSNumber*)matchType
    detectPeriod:(NSNumber*)detectPeriod
    singleIpLimit:(NSNumber*)singleIpLimit
    blockType:(NSNumber*)blockType
    blockTime:(NSNumber*)blockTime;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface WebWhiteListRuleSpec :NSObject

/// 白名单规则名称
@property (strong,nonatomic,nonnull)  NSString*  name;

/// 模式:&lt;br&gt;- 0: uri&lt;br&gt;- 1: ip&lt;br&gt;- 2: cookie&lt;br&gt;- 3: geo&lt;br&gt;- 4: header
@property (strong,nonatomic,nonnull)  NSNumber*  mode;

/// 匹配 key. mode 为 cookie 和 header 时必传.
   /// - mode 为 cookie 时, 传 cookie 的 name
   /// - mode 为 header 时, 传 header 的 key
   /// 
@property (strong,nonatomic,nonnull)  NSString*  key;

/// 匹配 value.
   /// - mode 为 uri 时, 传要匹配的 uri
   /// - mode 为 ip 时, 传引用的 ip 黑白名单 Id
   /// - mode 为 cookie 时, 传 cookie 的 value
   /// - mode 为 geo 时, 传 geo 区域编码以 &#39;,&#39; 分隔的字符串. 查询 &lt;a href&#x3D;&quot;http://docs.jdcloud.com/anti-ddos-pro/api/describegeoareas&quot;&gt;describeGeoAreas&lt;/a&gt; 接口获取可设置的地域编码列表
   /// - mode 为 header 时, 传 header 的 value
   /// 
@property (strong,nonatomic,nonnull)  NSString*  value;

/// 匹配规则. mode 为 uri, cookie 和 header 时必传. 支持以下匹配规则
   /// - 0: 完全匹配
   /// - 1: 前缀匹配
   /// - 2: 包含
   /// - 3: 正则匹配
   /// - 4: 后缀匹配
   /// 
@property (strong,nonatomic,nonnull)  NSNumber*  pattern;

/// 命中后处理动作.
   /// - 0: 放行
   /// - 1: CC 防护
   /// 
@property (strong,nonatomic,nonnull)  NSNumber*  action;

/// 规则状态.
   /// - 0: 关闭
   /// - 1: 开启
   /// 
@property (strong,nonatomic,nonnull)  NSNumber*  status;


-(id) initWithName:(NSString*) name
    mode:(NSNumber*)mode
    key:(NSString*)key
    value:(NSString*)value
    pattern:(NSNumber*)pattern
    action:(NSNumber*)action
    status:(NSNumber*)status;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface WebRule :NSObject

/// 规则 Id
@property (strong,nonatomic,nonnull)  NSString*  idValue;

/// 实例 Id
@property (strong,nonatomic,nonnull)  NSString*  instanceId;

/// 子域名
@property (strong,nonatomic,nonnull)  NSString*  domain;

/// 规则的 CNAME
@property (strong,nonatomic,nonnull)  NSString*  cname;

/// CNAME 解析状态, 0: 解析异常, 1: 解析正常
@property (strong,nonatomic,nonnull)  NSNumber*  cnameStatus;

/// Protocol
@property (strong,nonatomic,nonnull)  WebRuleProtocol*  protocol;

/// 是否为自定义端口号, 0: 为默认, 1: 为自定义
@property (strong,nonatomic,nonnull)  NSNumber*  customPortStatus;

/// HTTP 协议的端口号, 如 80,81
@property (strong,nonatomic,nonnull)  NSArray<NSNumber*>*  port;

/// HTTPS 协议的端口号, 如 443,8443
@property (strong,nonatomic,nonnull)  NSArray<NSNumber*>*  httpsPort;

/// 是否开启 http 回源, 0: 为不开启, 1: 为开启, 当勾选 HTTPS 时可以配置该属性
@property (strong,nonatomic,nonnull)  NSNumber*  httpOrigin;

/// 0: 防御状态, 1: 回源状态
@property (strong,nonatomic,nonnull)  NSNumber*  status;

/// 回源类型: A 或者 CNAME
@property (strong,nonatomic,nonnull)  NSString*  originType;

/// OriginAddr
@property (strong,nonatomic,nonnull)  NSArray<OriginAddrItem*>*  originAddr;

/// 回源域名, originType 为 CNAME 时返回该字段
@property (strong,nonatomic,nonnull)  NSString*  originDomain;

/// OnlineAddr
@property (strong,nonatomic,nonnull)  NSArray<NSString*>*  onlineAddr;

/// 证书状态, 0: 异常, 1: 正常, 2: 证书未上传
@property (strong,nonatomic,nonnull)  NSNumber*  httpCertStatus;

/// 证书 Id
@property (strong,nonatomic,nonnull)  NSString*  certId;

/// 证书名称
@property (strong,nonatomic,nonnull)  NSString*  certName;

/// 证书内容
@property (strong,nonatomic,nonnull)  NSString*  httpsCertContent;

/// 证书私钥
@property (strong,nonatomic,nonnull)  NSString*  httpsRsaKey;

/// 是否开启https强制跳转, 当 protocol 为 HTTP_HTTPS 时可以配置该属性
   ///   - 0 不强跳
   ///   - 1 开启强跳
   /// 
@property (strong,nonatomic,nonnull)  NSNumber*  forceJump;

/// 转发规则,  wrr: 带权重的轮询, rr: 不带权重的轮询
@property (strong,nonatomic,nonnull)  NSString*  algorithm;

/// CC 状态, 0: CC 关闭, 1: CC 开启
@property (strong,nonatomic,nonnull)  NSNumber*  ccStatus;

/// webSocket 状态, 0: 关闭, 1: 开启
@property (strong,nonatomic,nonnull)  NSNumber*  webSocketStatus;

/// 黑名单状态, 0: 关闭, 1: 开启
@property (strong,nonatomic,nonnull)  NSNumber*  blackListEnable;

/// 白名单状态, 0: 关闭, 1: 开启
@property (strong,nonatomic,nonnull)  NSNumber*  whiteListEnable;


-(id) initWithId:(NSString*) idValue
    instanceId:(NSString*)instanceId
    domain:(NSString*)domain
    cname:(NSString*)cname
    cnameStatus:(NSNumber*)cnameStatus
    protocol:(WebRuleProtocol*)protocol
    customPortStatus:(NSNumber*)customPortStatus
    port:(NSArray<NSNumber*>*)port
    httpsPort:(NSArray<NSNumber*>*)httpsPort
    httpOrigin:(NSNumber*)httpOrigin
    status:(NSNumber*)status
    originType:(NSString*)originType
    originAddr:(NSArray<OriginAddrItem*>*)originAddr
    originDomain:(NSString*)originDomain
    onlineAddr:(NSArray<NSString*>*)onlineAddr
    httpCertStatus:(NSNumber*)httpCertStatus
    certId:(NSString*)certId
    certName:(NSString*)certName
    httpsCertContent:(NSString*)httpsCertContent
    httpsRsaKey:(NSString*)httpsRsaKey
    forceJump:(NSNumber*)forceJump
    algorithm:(NSString*)algorithm
    ccStatus:(NSNumber*)ccStatus
    webSocketStatus:(NSNumber*)webSocketStatus
    blackListEnable:(NSNumber*)blackListEnable
    whiteListEnable:(NSNumber*)whiteListEnable;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface WebRuleSpec :NSObject

/// 子域名
@property (strong,nonatomic,nonnull)  NSString*  domain;

/// 协议: http, https 至少一个为 true
@property (strong,nonatomic,nonnull)  WebRuleProtocol*  protocol;

/// HTTP协议的端口号, 如80, 81; 如果 protocol.http 为 true, 至少配置一个端口, 最多添加 5 个
@property (strong,nonatomic,nonnull)  NSArray<NSNumber*>*  port;

/// HTTPS协议的端口号，如443, 8443; 如果 protocol.https 为 true, 至少配置一个端口, 最多添加 5 个
@property (strong,nonatomic,nonnull)  NSArray<NSNumber*>*  httpsPort;

/// 回源类型：A或者CNAME
@property (strong,nonatomic,nonnull)  NSString*  originType;

/// originType 为 A 时，需要设置该字段
@property (strong,nonatomic,nonnull)  NSArray<OriginAddrItem*>*  originAddr;

/// 备用的回源地址列表，可以配置为一个域名或者多个 ip 地址
@property (strong,nonatomic,nonnull)  NSArray<NSString*>*  onlineAddr;

/// 回源域名,originType为CNAME时需要指定该字段
@property (strong,nonatomic,nonnull)  NSString*  originDomain;

/// 转发规则：wrr-&gt;带权重的轮询，rr-&gt;不带权重的轮询
@property (strong,nonatomic,nonnull)  NSString*  algorithm;

/// 是否开启 https 强制跳转，当 protocol 为 HTTP_HTTPS 时可以配置该属性
   ///   - 0 不开启强制跳转
   ///   - 1 开启强制跳转
   /// 
@property (strong,nonatomic,nonnull)  NSNumber*  forceJump;

/// 是否为自定义端口号，0为默认 1为自定义
@property (strong,nonatomic,nonnull)  NSNumber*  customPortStatus;

/// 是否开启http回源, 当勾选HTTPS时可以配置该属性
   ///   - 0 不开启
   ///   - 1 开启
   /// 
@property (strong,nonatomic,nonnull)  NSNumber*  httpOrigin;

/// 是否开启 WebSocket, 0 为不开启, 1 为开启
@property (strong,nonatomic,nonnull)  NSNumber*  webSocketStatus;

/// 证书内容
@property (strong,nonatomic,nonnull)  NSString*  httpsCertContent;

/// 证书私钥
@property (strong,nonatomic,nonnull)  NSString*  httpsRsaKey;

/// 证书 Id
   ///   - 如果传 certId, 请确认已经上传了相应的证书
   ///   - certId 缺省时网站规则将使用 httpsCertContent, httpsRsaKey 对应的证书
@property (strong,nonatomic,nonnull)  NSString*  certId;


-(id) initWithDomain:(NSString*) domain
    protocol:(WebRuleProtocol*)protocol
    port:(NSArray<NSNumber*>*)port
    httpsPort:(NSArray<NSNumber*>*)httpsPort
    originType:(NSString*)originType
    originAddr:(NSArray<OriginAddrItem*>*)originAddr
    onlineAddr:(NSArray<NSString*>*)onlineAddr
    originDomain:(NSString*)originDomain
    algorithm:(NSString*)algorithm
    forceJump:(NSNumber*)forceJump
    customPortStatus:(NSNumber*)customPortStatus
    httpOrigin:(NSNumber*)httpOrigin
    webSocketStatus:(NSNumber*)webSocketStatus
    httpsCertContent:(NSString*)httpsCertContent
    httpsRsaKey:(NSString*)httpsRsaKey
    certId:(NSString*)certId;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface ForwardRule :NSObject

/// 规则id
@property (strong,nonatomic,nonnull)  NSString*  idValue;

/// 实例id
@property (strong,nonatomic,nonnull)  NSString*  instanceId;

/// TCP或UDP
@property (strong,nonatomic,nonnull)  NSString*  protocol;

/// 规则的cname
@property (strong,nonatomic,nonnull)  NSString*  cname;

/// 回源类型: ip或者domain
@property (strong,nonatomic,nonnull)  NSString*  originType;

/// 端口号
@property (strong,nonatomic,nonnull)  NSNumber*  port;

/// 转发规则
   /// - wrr 带权重的轮询
   /// - rr  不带权重的轮询
   /// - sh  源地址hash
   /// 
@property (strong,nonatomic,nonnull)  NSString*  algorithm;

/// OriginAddr
@property (strong,nonatomic,nonnull)  NSArray<OriginAddrItem*>*  originAddr;

/// 备用的回源地址列表
@property (strong,nonatomic,nonnull)  NSArray<NSString*>*  onlineAddr;

/// 回源域名
@property (strong,nonatomic,nonnull)  NSString*  originDomain;

/// 回源端口号
@property (strong,nonatomic,nonnull)  NSNumber*  originPort;

/// 0防御状态，1回源状态
@property (strong,nonatomic,nonnull)  NSNumber*  status;


-(id) initWithId:(NSString*) idValue
    instanceId:(NSString*)instanceId
    protocol:(NSString*)protocol
    cname:(NSString*)cname
    originType:(NSString*)originType
    port:(NSNumber*)port
    algorithm:(NSString*)algorithm
    originAddr:(NSArray<OriginAddrItem*>*)originAddr
    onlineAddr:(NSArray<NSString*>*)onlineAddr
    originDomain:(NSString*)originDomain
    originPort:(NSNumber*)originPort
    status:(NSNumber*)status;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface WebWhiteListRule :NSObject

/// 白名单规则 Id
@property (strong,nonatomic,nonnull)  NSString*  idValue;

/// 白名单规则名称
@property (strong,nonatomic,nonnull)  NSString*  name;

/// 匹配模式:&lt;br&gt;- 0: uri&lt;br&gt;- 1: ip&lt;br&gt;- 2: cookie&lt;br&gt;- 3: geo&lt;br&gt;- 4: header
@property (strong,nonatomic,nonnull)  NSNumber*  mode;

/// 匹配 key.
   /// - mode 为 cookie 时, 为 cookie 的 name
   /// - mode 为 header 时, 为 header 的 key
   /// 
@property (strong,nonatomic,nonnull)  NSString*  key;

/// 匹配 value.
   /// - mode 为 uri 时, 为要匹配的 uri
   /// - mode 为 ip 时, 为引用的 ip 黑白名单 Id
   /// - mode 为 cookie 时, 为 cookie 的 value
   /// - mode 为 header 时, 为 header 的 value
   /// 
@property (strong,nonatomic,nonnull)  NSString*  value;

/// 匹配规则. mode 为 uri, cookie 和 header 时必传. 包含以下匹配规则
   /// - 0: 完全匹配
   /// - 1: 前缀匹配
   /// - 2: 包含
   /// - 3: 正则匹配
   /// - 4: 后缀匹配
   /// 
@property (strong,nonatomic,nonnull)  NSNumber*  pattern;

/// 命中后处理动作.
   /// - 0: 放行
   /// - 1: CC 防护
   /// 
@property (strong,nonatomic,nonnull)  NSNumber*  action;

/// 规则状态.
   /// - 0: 关闭
   /// - 1: 开启
   /// 
@property (strong,nonatomic,nonnull)  NSNumber*  status;

/// geo 白名单地域列表
@property (strong,nonatomic,nonnull)  NSArray<Geo*>*  geoList;


-(id) initWithId:(NSString*) idValue
    name:(NSString*)name
    mode:(NSNumber*)mode
    key:(NSString*)key
    value:(NSString*)value
    pattern:(NSNumber*)pattern
    action:(NSNumber*)action
    status:(NSNumber*)status
    geoList:(NSArray<Geo*>*)geoList;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface ForwardRuleSpec :NSObject

/// 协议: TCP或者UDP
@property (strong,nonatomic,nonnull)  NSString*  protocol;

/// 端口号, 取值范围[1, 65535]
@property (strong,nonatomic,nonnull)  NSNumber*  port;

/// 转发规则
   /// - wrr 带权重的轮询
   /// - rr  不带权重的轮询
   /// - sh  源地址hash
   /// 
@property (strong,nonatomic,nonnull)  NSString*  algorithm;

/// 回源类型: A 或者 CNAME
@property (strong,nonatomic,nonnull)  NSString*  originType;

/// OriginAddr
@property (strong,nonatomic,nonnull)  NSArray<OriginAddrItem*>*  originAddr;

/// 备用的回源地址列表, 可以配置为一个域名或者多个 ip 地址
@property (strong,nonatomic,nonnull)  NSArray<NSString*>*  onlineAddr;

/// 回源域名
@property (strong,nonatomic,nonnull)  NSString*  originDomain;

/// 回源端口号, 取值范围[1, 65535]
@property (strong,nonatomic,nonnull)  NSNumber*  originPort;


-(id) initWithProtocol:(NSString*) protocol
    port:(NSNumber*)port
    algorithm:(NSString*)algorithm
    originType:(NSString*)originType
    originAddr:(NSArray<OriginAddrItem*>*)originAddr
    onlineAddr:(NSArray<NSString*>*)onlineAddr
    originDomain:(NSString*)originDomain
    originPort:(NSNumber*)originPort;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface ForwardProtectionRule :NSObject

/// 虚假源与空连接, 0: 关闭, 1: 开启
@property (strong,nonatomic,nonnull)  NSNumber*  spoofIpEnable;

/// 源新建连接限速, 0: 关闭, 1: 开启
@property (strong,nonatomic,nonnull)  NSNumber*  srcNewConnLimitEnable;

/// 源新建连接速率
@property (strong,nonatomic,nonnull)  NSNumber*  srcNewConnLimitValue;

/// 源并发连接限速, 0: 关闭, 1: 开启
@property (strong,nonatomic,nonnull)  NSNumber*  srcConcurrentConnLimitEnable;

/// 源并发连接速率
@property (strong,nonatomic,nonnull)  NSNumber*  srcConcurrentConnLimitValue;

/// 目的新建连接限速, 0: 关闭, 1: 开启
@property (strong,nonatomic,nonnull)  NSNumber*  dstNewConnLimitEnable;

/// 目的新建连接速率
@property (strong,nonatomic,nonnull)  NSNumber*  dstNewConnLimitValue;

/// 目的并发连接限速, 0: 关闭, 1: 开启
@property (strong,nonatomic,nonnull)  NSNumber*  dstConcurrentConnLimitEnable;

/// 目的并发连接速率
@property (strong,nonatomic,nonnull)  NSNumber*  dstConcurrentConnLimitValue;

/// 报文最小长度
@property (strong,nonatomic,nonnull)  NSNumber*  datagramRangeMin;

/// 报文最大长度
@property (strong,nonatomic,nonnull)  NSNumber*  datagramRangeMax;

/// geo 拦截地域列表
@property (strong,nonatomic,nonnull)  NSArray<Geo*>*  geoBlackList;


-(id) initWithSpoofIpEnable:(NSNumber*) spoofIpEnable
    srcNewConnLimitEnable:(NSNumber*)srcNewConnLimitEnable
    srcNewConnLimitValue:(NSNumber*)srcNewConnLimitValue
    srcConcurrentConnLimitEnable:(NSNumber*)srcConcurrentConnLimitEnable
    srcConcurrentConnLimitValue:(NSNumber*)srcConcurrentConnLimitValue
    dstNewConnLimitEnable:(NSNumber*)dstNewConnLimitEnable
    dstNewConnLimitValue:(NSNumber*)dstNewConnLimitValue
    dstConcurrentConnLimitEnable:(NSNumber*)dstConcurrentConnLimitEnable
    dstConcurrentConnLimitValue:(NSNumber*)dstConcurrentConnLimitValue
    datagramRangeMin:(NSNumber*)datagramRangeMin
    datagramRangeMax:(NSNumber*)datagramRangeMax
    geoBlackList:(NSArray<Geo*>*)geoBlackList;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface Country :NSObject

/// 国家或地区名称
@property (strong,nonatomic,nonnull)  NSString*  label;

/// 国家或地区编码
@property (strong,nonatomic,nonnull)  NSString*  value;

/// Children
@property (strong,nonatomic,nonnull)  NSArray<Country*>*  children;


-(id) initWithLabel:(NSString*) label
    value:(NSString*)value
    children:(NSArray<Country*>*)children;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface WebBlackListRule :NSObject

/// 黑名单规则 Id
@property (strong,nonatomic,nonnull)  NSString*  idValue;

/// 黑名单规则名称
@property (strong,nonatomic,nonnull)  NSString*  name;

/// 匹配模式:&lt;br&gt;- 0: uri&lt;br&gt;- 1: ip&lt;br&gt;- 2: cookie&lt;br&gt;- 3: geo&lt;br&gt;- 4: header
@property (strong,nonatomic,nonnull)  NSNumber*  mode;

/// 匹配 key.
   /// - mode 为 cookie 时, 为 cookie 的 name
   /// - mode 为 header 时, 为 header 的 key
   /// 
@property (strong,nonatomic,nonnull)  NSString*  key;

/// 匹配 value.
   /// - mode 为 uri 时, 为要匹配的 uri
   /// - mode 为 ip 时, 为引用的 ip 黑白名单 Id
   /// - mode 为 cookie 时, 为 cookie 的 value
   /// - mode 为 header 时, 为 header 的 value
   /// 
@property (strong,nonatomic,nonnull)  NSString*  value;

/// 匹配规则. mode 为 uri, cookie 和 header 时必传. 包含以下匹配规则
   /// - 0: 完全匹配
   /// - 1: 前缀匹配
   /// - 2: 包含
   /// - 3: 正则匹配
   /// - 4: 后缀匹配
   /// 
@property (strong,nonatomic,nonnull)  NSNumber*  pattern;

/// 命中后处理动作.
   /// - 0: 放行
   /// - 1: CC 防护
   /// 
@property (strong,nonatomic,nonnull)  NSNumber*  action;

/// 命中后处理值, action 为 2 时 actionValue 为跳转路径
@property (strong,nonatomic,nonnull)  NSString*  actionValue;

/// 规则状态.
   /// - 0: 关闭
   /// - 1: 开启
   /// 
@property (strong,nonatomic,nonnull)  NSNumber*  status;

/// geo 黑名单地域列表, mode 不为 geo 或未设置时此字段为空
@property (strong,nonatomic,nonnull)  NSArray<Geo*>*  geoList;


-(id) initWithId:(NSString*) idValue
    name:(NSString*)name
    mode:(NSNumber*)mode
    key:(NSString*)key
    value:(NSString*)value
    pattern:(NSNumber*)pattern
    action:(NSNumber*)action
    actionValue:(NSString*)actionValue
    status:(NSNumber*)status
    geoList:(NSArray<Geo*>*)geoList;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end

#endif /* IpantiModel_h */
